﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NCS.Library;

namespace NCS.Module.CMS.Web.HomePage
{
    public partial class Languages : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (AppEnv.GetLanguage() == "en-US")
            {
                LinkLang.Text = "VietNamese";

            }
            else
            {
                LinkLang.Text = "Tiếng Anh";
            }
        }
        protected void LinkLang_Click(object sender, EventArgs e)
        {
            if (AppEnv.GetLanguage() == "en-US")
            {
                AppEnv.SetLanguage("vi-VN");
            }
            else
            {
                AppEnv.SetLanguage("en-US");
            }
            //Response.Redirect(Request.RawUrl,true);
            Response.Redirect("/home/Default.aspx");

        }
    }
}